Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "chalice url" command #169

Merged
merged 5 commits into from
Nov 15, 2016
Merged

Add "chalice url" command #169

merged 5 commits into from
Nov 15, 2016

Conversation

jamesls
Copy link
Member

@jamesls jamesls commented Nov 15, 2016

This command will print the API gateway URL for the current app.

This is the same value that's printed at the end of chalice deploy. This has several benefits:

  • You can programatically get the http url endpoint instead of using chalice deploy | tail -n 1.
  • There was previously no easy way to get the deployed url. If you've already deployed your app but didn't record the deployed url, you'd have to look up the rest_api_id yourself and manually construct the URL (or look it up in the console).

As part of this change, I refactored the CLI logic to remove some duplicate code when creating the chalice.config.Config object. This should make it easier for new commands that require a config object.

This removes duplication where project_dir is processed
in every command.
That way all commands can implement debug support if they want
without having to call out that argument.
This makes it easy to get the URL of an app you've
already deployed.
This removes the duplication from the CLI commands
that needed to load config.

As part of this change, I needed to make one change that
was previously wrong, which is that config.stage_name
should just be config.stage.
@jamesls jamesls merged commit cf14f20 into aws:master Nov 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant